package cc.vicp.djx314.starfood.util.impls;

import cc.vicp.djx314.starfood.util.FileUtil;

public class FileUtilImpl implements FileUtil {
	@Override
	public String getFileExtend(String fileName) {
		if ((fileName != null) && (fileName.length() > 0)) {
			int dot = fileName.lastIndexOf('.');
			if ((dot >-1) && (dot < (fileName.length() - 1))) {
				return fileName.substring(dot + 1);
			}
		}
		return fileName;
	}	
}
